#ifndef CMATERIAL_H
#define CMATERIAL_H

#include <QString>

class CMaterial
{
public:
    CMaterial();
    CMaterial(float r, float g, float b, float reflection, float rS = 1.0f, float gS = 1.0f, float bS = 1.0f, float PowerS = 60.0f, bool bTrans = false, float n = 1.0f,  float refrac = 0.0f);

    CMaterial(const CMaterial & M);

    bool                loadMaterial(const QString sFileName);
    static CMaterial*   getvoidContext();
    static CMaterial*   getairContext();
    void				setTransparent(bool bTrans, float N, float refraction = 0.6);
    void				setRefractionInd(float nR, float nG = 0.0, float nB = 0.0);

    float m_fRed, m_fGreen, m_fBlue;				//  [0,1] : color
    float m_fReflection;                            //	[0,1] : reflected ray proportion
    float m_fRefraction;                            //	[0,1] : refracted ray proportion
    bool  m_bTransparent;
    float m_fN;                                     //  > 1	  : refraction
    float m_fNred, m_fNgreen, m_fNblue;             //  > 1   : refraction by color channel
    float m_fRedS, m_fGreenS, m_fBlueS, m_fPowerS;  //  [0,1] : speculare color phong illumination

};

#endif // CMATERIAL_H
